home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / XINTRO18.ZIP / M13ORG.ASC < prev    next >
Text File  |  1993-08-28  |  2KB  |  56 lines

  1. Figure 1: Memory organization in mode 13h (ASCII version)
  2.       by Robert Schmidt
  3.           (C) 1993 Ztiff Zox Softwear
  4.  
  5. a. Imagine that the top of the screen looks like this (pixel values are
  6.    represented by color digits 0-9 for simplicity - actual colors may
  7.    range from 0 to 255) - a screen width of 320 pixels is assumed:
  8.  
  9.     address:  0         10                310      319
  10.              ----------------------------------------
  11.              |0123456789012345    .....   0123456789|
  12.              |                                      |
  13.              |                                      |
  14.              |
  15.  
  16. b. In VGA memory, the screen is represented as follows (question marks
  17.    represent unused bytes):
  18.  
  19.    Plane 0:
  20.  
  21.     address:  0         10                310      319
  22.              ----------------------------------------
  23.              |0???4???8???2???    .....   ??2???6???|
  24.              |                                      |
  25.              |                                      |
  26.  
  27.    Plane 1:
  28.  
  29.     address:  0         10                310      319
  30.              ----------------------------------------
  31.              |?1???5???9???3??    .....   ???3???7??|
  32.              |                                      |
  33.              |                                      |
  34.  
  35.    Plane 2:
  36.  
  37.     address:  0         10                310      319
  38.              ----------------------------------------
  39.              |??2???6???0???4?    .....   0???4???8?|
  40.              |                                      |
  41.              |                                      |
  42.  
  43.    Plane 3:
  44.  
  45.     address:  0         10                310      319
  46.              ----------------------------------------
  47.              |???3???7???1???5    .....   ?1???5???9|
  48.              |                                      |
  49.              |                                      |
  50.  
  51.    I.e. a plane is selected automatically by the two least significant
  52.    bits of the address of the byte being read from or written two.
  53.    This renders 3/4 of the video memory unavailable and useless, but
  54.    all visible pixels are easily accessed, as each address in the video
  55.    segment provides access to one and ONLY ONE pixel.
  56.